package com.xiangshizhineng.tianzhangzhi.app.model.response;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.xiangshizhineng.tianzhangzhi.app.common.base.BaseDTO;
import com.xiangshizhineng.tianzhangzhi.app.model.entity.File;
import com.xiangshizhineng.tianzhangzhi.app.utils.LongJsonSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@JsonInclude(JsonInclude.Include.NON_NULL)
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "事件表")
@TableName("tz_event")
public class EventResponse extends BaseDTO implements Serializable {
    /**
     * 任务id
     */
    @ApiModelProperty(value = "任务id")
    @JsonSerialize(using = LongJsonSerializer.class)
    private Long taskId;
    /**
     * 事件名称
     */
    @ApiModelProperty(value = "事件名称")
    private String eventName;
    /**
     * 事件违法类型（字典表）
     */
    @ApiModelProperty(value = "事件违法类型（8非法占地9破坏耕地）")
    @JsonSerialize(using = LongJsonSerializer.class)
    private Long eventIllegalTypeId;
    /**
     * 事件描述
     */
    @ApiModelProperty(value = "事件描述")
    private String eventDes;
    /**
     * x坐标
     */
    @ApiModelProperty(value = "x坐标")
    @NotNull(message = "x坐标为空")
    private BigDecimal eventX;
    /**
     * y坐标
     */
    @ApiModelProperty(value = "y坐标")
    @NotNull(message = "y坐标为空")
    private BigDecimal eventY;
    /**
     * 上报时间
     */
    @ApiModelProperty(value = "上报时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;
    /**
     *
     */
    @ApiModelProperty(value = "")
    private Date updateTime;
    /**
     * 事件状态（字典表）
     */
    @ApiModelProperty(value = "事件状态（10待审核 11待处理 12已解决）")
    @JsonSerialize(using = LongJsonSerializer.class)
    private Long eventStatusId;
    /**
     * 事件上报方式（0普通上报,1快速上报）
     */
    @ApiModelProperty(value = "事件上报方式（22普通上报,23快速上报）")
    private Long eventReportTypeId;
    /**
     * 解决情况
     */
    @ApiModelProperty(value = "解决情况")
    private String solveSituation;
    /**
     * 审核人(当前用户的上级田长id)
     */
    @ApiModelProperty(value = "审核人(当前用户的上级田长id)")
    @JsonSerialize(using = LongJsonSerializer.class)
    private Long reviewer;
    /**
     * 上报人id
     */
    @ApiModelProperty(value = "上报人id")
    @JsonSerialize(using = LongJsonSerializer.class)
    private Long reportBy;
    /**
     * 审核意见
     */
    @ApiModelProperty(value = "审核意见")
    private String reviewComments;
    /**
     * 审核时间
     */
    @ApiModelProperty(value = "审核时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date reviewerTime;
    @ApiModelProperty(value = "处理人")
    private Long handler;
    @ApiModelProperty(value = "催办")
    private String cb;
    /**
     * 图斑id
     */
    @ApiModelProperty(value = "图斑id")
    private String tbId;
    /**
     * 附件表
     */
    //private List<EventFileResponse> eventFileResponses;
/*    @TableField(exist = false)
    private List<String> filePath;*/

    /**
     * 附件信息
     */
    @TableField(exist = false)
    private List<File> files;

    /**
     * @data: 2022/1/11-23:33
     * @User: WangShuo
     * @Description: 用户对象
     */
    @ApiModelProperty(value = "上报人姓名")
    @TableField(exist = false)
    private String reportName;
//    @ApiModelProperty(value = "事件违法类型")
//    private String eventIllegalType;
//    @ApiModelProperty(value = "事件上报方式")
//    private String eventReportType;
//    @ApiModelProperty(value = "事件状态")
//    private String eventStatus;
    @ApiModelProperty(value = "处理人")
    @TableField(exist = false)
    private String handlerName;
    @ApiModelProperty(value = "审核人")
    @TableField(exist = false)
    private String reviewerName;
}
